<template>
    <div id="competitiveInformation">
        <div class="volunteer" align="left" style="margin-top:60px">
            <template>
                <Button type="primary" style="margin-right:30px;width: 100px" @click='intelligence_student_onclick'>招生计划情报</Button>
                <Button type="warning" style="margin-right:30px;width: 100px" @click='intelligence_opponent_onclick'>功能使用情报</Button>
                <Button type="warning" style="margin-right:30px;width: 100px" @click='intelligence_grade_onclick'>分数情报</Button>
                <Button type="warning" style="margin-right:30px;width: 100px" @click='intelligence_ranking_onclick'>排名情报</Button>
            </template>
        </div>
        <div class="volunteer" align="left" style="margin-top:30px">
            <template>
                <Icon type="plus-circled" style="color: #ee9900;font-size: 18px;">
                </Icon>
                <span style="font-size:17px">第一批次
          			</span>
            </template>
        </div>

        <hr style='margin-top:10px'>
        <div class="operation" style='margin-top:30px'>
            <template>
                <Table border :columns="columns7" :data="data6"></Table>
            </template>
        </div>
        <div class="volunteer-2" align="left" style="margin-top:30px">
            <template>
                <Icon type="plus-circled" style="color: #ee9900;font-size: 18px;">
                </Icon>
                <span style="font-size:17px">第二批次
          			</span>
            </template>
        </div>
        <hr style='margin-top:10px'>
        <div class="operation" style='margin-top:30px'>
            <template>
                <Table border :columns="columns8" :data="data8"></Table>
            </template>
        </div>
        <div class="volunteer-3" align="left" style="margin-top:30px">
            <template>
                <Icon type="plus-circled" style="color: #ee9900;font-size: 18px;">
                </Icon>
                <span style="font-size:17px">第三批次
          			</span>
            </template>
        </div>
        <hr style='margin-top:10px'>
        <div class="operation" style='margin-top:30px'>
            <template>
                <Table border :columns="columns3" :data="data3"></Table>
            </template>
        </div>
        <div class="volunteer-4" align="left" style="margin-top:30px">
            <template>
                <Icon type="plus-circled" style="color: #ee9900;font-size: 18px;">
                </Icon>
                <span style="font-size:17px">专科/高职
          			</span>
            </template>
        </div>
        <hr style='margin-top:10px'>
        <div class="operation" style='margin-top:30px'>
            <template>
                <Table border :columns="columns4" :data="data4"></Table>
            </template>
        </div>

    </div>
</template>
<script>
    import {exam} from "../../../../api/index.js"
    export default {
        data () {
            return {
                columns7: [
                    {
                        title: '院校名称',
                        key: 'martich_school_name'
                    },
                    {
                        title: '专业名称',
                        key: 'view_zy_name'

                    },
                    {
                        title: '2015-招生计划',
                        key: 'zssl_three'

                    },
                    {
                        title: '2016-招生计划',
                        key: 'zssl_two'

                    },
                    {
                        title: '2017-招生计划',
                        key: 'zssl_one'
                    }
                ],
                data6: [

                ],
                columns8: [
                    {
                        title: '院校名称',
                        key: 'martich_school_name'
                    },
                    {
                        title: '专业名称',
                        key: 'view_zy_name'

                    },
                    {
                        title: '2015-招生计划',
                        key: 'zssl_three'

                    },
                    {
                        title: '2016-招生计划',
                        key: 'zssl_two'

                    },
                    {
                        title: '2017-招生计划',
                        key: 'zssl_one'
                    }
                ],
                data8: [

                ], columns3: [
                    {
                        title: '院校名称',
                        key: 'martich_school_name'
                    },
                    {
                        title: '专业名称',
                        key: 'view_zy_name'

                    },
                    {
                        title: '2015-招生计划',
                        key: 'zssl_three'

                    },
                    {
                        title: '2016-招生计划',
                        key: 'zssl_two'

                    },
                    {
                        title: '2017-招生计划',
                        key: 'zssl_one'
                    }
                ],
                data3: [

                ],
                columns4: [
                    {
                        title: '院校名称',
                        key: 'martich_school_name'
                    },
                    {
                        title: '专业名称',
                        key: 'view_zy_name'

                    },
                    {
                        title: '2015-招生计划',
                        key: 'zssl_three'

                    },
                    {
                        title: '2016-招生计划',
                        key: 'zssl_two'

                    },
                    {
                        title: '2017-招生计划',
                        key: 'zssl_one'
                    }
                ],
                data4: [

                ]
            }
        },
        methods: {
            intelligence_ranking_onclick: function () {
                this.$router.push({
                    name: 'intelligence_ranking'
                });
            },intelligence_grade_onclick: function () {
                this.$router.push({
                    name: 'intelligence_grade'
                });
            },intelligence_opponent_onclick: function () {
                this.$router.push({
                    name: 'competitive_information'
                });
            },intelligence_student_onclick: function () {
                this.$router.push({
                    name: 'intelligence_student'
                });
            },firstLoad(){
                var _this = this;
                //查询第一志愿信息
                exam.findAll_IntelligenceStudent({data:{batchId:"01"}}).then((data) => {
                    for(var i in data.data.data.IntelligenceStudent){
                    _this.data6.push(data.data.data.IntelligenceStudent[i]) ;
                }
                if(data.data.data.resCode = "0"){
                    this.secondLoad();
                }
            }, function (error) {
                    console.log(error);
                });
            },secondLoad(){
                var _this = this;
                //查询第二志愿信息
                exam.findAll_IntelligenceStudent({data:{batchId:"02"}}).then((data) => {
                    for(var i in data.data.data.IntelligenceStudent){
                    _this.data8.push(data.data.data.IntelligenceStudent[i]) ;
                }
                if(data.data.data.resCode = "0"){
                    this.thirdLoad();
                }
            }, function (error) {
                    console.log(error);
                });
            },thirdLoad(){
                //查询第三志愿信息
                var _this = this;
                exam.findAll_IntelligenceStudent({data:{batchId:"03"}}).then((res) => {
                    for(var i in res.data.data.IntelligenceStudent){
                    _this.data3.push(res.data.data.IntelligenceStudent[i]) ;
                }if(res.data.data.resCode = "0"){
                    this.fouthLoad();
                }
            }, function (error) {
                    console.log(error);
                });
            },fouthLoad(){
                //查询第四志愿信息
                var _this = this;
                exam.findAll_IntelligenceStudent({data:{batchId:"04"}}).then((res) => {
                    for(var i in res.data.data.IntelligenceStudent){
                    _this.data4.push(res.data.data.IntelligenceStudent[i]);
                }
            }, function (error) {
                    console.log(error);
                });
            }
        },mounted() {
            this.firstLoad();

        }
    }
</script>

